package com.ruoyi.web.controller.parkmanagement;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.parkmangement.domain.vo.ParkingStatVO;
import com.ruoyi.parkmangement.service.IReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/parkmanagement/report")
public class ReportController {

    @Autowired
    private IReportService reportService;

    @GetMapping
    public AjaxResult getParkingStats() {
        List<ParkingStatVO> stats = reportService.getParkingStats();
        return AjaxResult.success(stats);
    }
}